import os
import pathlib
import sys

root_path = str(pathlib.Path(os.path.abspath(__file__)).parent.parent.parent)
sys.path.append(root_path)

from sklearn.cluster import DBSCAN
from ml_utils.config.base_config import *


def model(best_params):
    # best_params = params
    eps = best_params['eps'][0]
    min_samples = best_params['min_samples'][0]
    cluster = DBSCAN(eps=eps, min_samples=min_samples)
    return cluster
